package com.studio701.carguard.controller;



import com.studio701.carguard.pojo.ReportHumanHeartrate;
import com.studio701.carguard.service.IReportHumanHeartrateService;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xjc
 * @since 2022-03-28
 */
@RestController
@RequestMapping("/report-human-heartrate")
public class ReportHumanHeartrateController {

    @Autowired
    IReportHumanHeartrateService iReportHumanHeartrateService;

    @ApiOperation("添加心率表")
    @PostMapping("/")
    public boolean insertHeartRate(@RequestBody ReportHumanHeartrate reportHumanHeartrate){
        return iReportHumanHeartrateService.save(reportHumanHeartrate);
    }

    @ApiOperation("获取心率表")
    @GetMapping("/")
    ReportHumanHeartrate getByRhId(Integer id){
        return iReportHumanHeartrateService.getByRhId(id);
    }
}
